package com.bonc.util.response;

/**
 * @Description: 类作用描述
 * @Author: ChenZhiXiang
 * @CreateDate: 2018/11/22 0022 11:45
 * @Version: 1.0
 */
public enum OperationEnum {

    opseration1("login","登录系统"),
    opseration2("logout","退出系统"),
    msg1("sms","由于未发短信，故部分数据无法展示.");

    private String url;

    private String operation;

    OperationEnum(String url, String operation) {
        this.url = url;
        this.operation = operation;
    }

    public static String getValue(String value) {
        OperationEnum[] businessModeEnums = values();
        for (OperationEnum businessModeEnum : businessModeEnums) {
            if (businessModeEnum.url.equals(value)) {
                return businessModeEnum.url;
            }
        }
        return null;
    }

    public static String getDesc(String value) {
        OperationEnum[] businessModeEnums = values();
        for (OperationEnum businessModeEnum : businessModeEnums) {
            if (businessModeEnum.url.equals(value)) {
                return businessModeEnum.operation;
            }
        }
        return null;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getOperation() {
        return operation;
    }

    public void setOperation(String operation) {
        this.operation = operation;
    }
}
